package com.yonyougov.devops.cruxcisupport.k8s.rest;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;

/**
 * web端创建Deployment接口调用的入参
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "创建Deployment的入参")
public class DeploymentRestRequest {
    @ApiModelProperty(required = true, value = "环境名称")
    @NotEmpty
    private String envName;

    @ApiModelProperty(required = true, value = "应用名称")
    @NotEmpty
    private String appName;

    @ApiModelProperty(required = true, value = "镜像名称")
    private String imageName;

    @ApiModelProperty(required = true, value = "版本名称")
    private String packageVersion;

    @ApiModelProperty(required = true, value = "实例数")
    @NotNull
    private Integer replicas;

    @ApiModelProperty(required = true, value = "t_env表的ID")
    @NotNull
    private BigInteger envId;

    @ApiModelProperty(required = true, value = "t_app表的ID")
    @NotNull
    private BigInteger appId;

    @ApiModelProperty(required = true, value = "t_app_env表的ID")
    @NotNull
    private BigInteger appEnvId;

}
